package game.tools
{
	import away3d.containers.*;
	import away3d.primitives.*;
	
	import engine.asset.*;
	import engine.core.*;
	import engine.graphics.*;
	import engine.graphics.away3d.*;
	import engine.loaders.*;
	import engine.math.*;
	
	import flash.display.*;
	import flash.events.*;
	import flash.text.*;
	
	import game.*;
	import game.actor.*;
	import game.asset.*;
	import game.core.*;
	import game.graphics.away3d.*;
	import game.graphics.shader.*;
	import game.network.*;
	import game.scene.*;
	
	public class RxLayoutEditor extends RxEntity
	{
		private var m_view:View3D;
		private var m_scene:RxScene;
		private var m_gameCamera:RxGameCamera;
		private var m_stage:Stage;
		private var m_url:String;
		private var m_stateMachine:RxStateMachine;
		private var m_nav:RxAssetNavNode;
		private var m_layout:RxAssetLayout;
		private var m_targetActor:RxActor;
		private var m_selectActor:RxActor;
		private var m_selectOldMat:RxMaterial;
		private var m_selectOffset:RxVector4;
		private var m_debounce:Boolean;
		private var m_deleted:int;
		private var m_rotating:int;
		private var m_rotOriginalMousePos:RxVector4;
		private var m_rotOriginalAngle:Number;
		private var m_spawnerType:Array = null;
		private var m_textBox:TextField;
		private var m_textEntry:String;
		private var m_createNodeIndex:int;
		private var m_clicked:int;
		private var m_pathLines:Array;
		private var m_pathPath:Array;
		private var m_pathEntityXML:Array;
		private var m_ignoreP:int;
		private var m_addedPathNode:int;
		private var m_undo:Array;
		private var m_redo:Array;
		private var m_remove:RxActor;
		private var m_create:XML;
		private static const ITEM_WIDTH:int = 256;
		private static const ITEM_X_SPACING:int = 16;
		private static const ITEM_HEIGHT:int = 20;
		private static const ITEM_Y_OFFSET:int = 2;
		private static const ITEM_Y_SPACING:int = 0;
		private static const MAX_ROWS:int = 40;
		private static var s_charactersLoaded:Boolean = false;
		private static var s_pathMouseDown:int;
		private static var s_path:Array;
		private static var s_pathEntityXML:XML;
		private static var s_pathNodeIndex:int;
		private static var s_pathIndex:int;
		
		public function RxLayoutEditor(param1:View3D, param2:RxGameCamera, param3:Stage, param4:String)
		{
			super(RxEntityPhase.ENTITY_PHASE_POSTHUD, RxEntityType.ENTITY_TYPE_HUD, "layoutEditor", 8421504);
			this.m_view = param1;
			this.m_scene = param1.GetScene() as RxScene;
			this.m_gameCamera = param2;
			this.m_stage = param3;
			this.m_url = param4;
			this.m_stateMachine = new RxStateMachine();
			this.m_stateMachine.AddState("select", this._selectState, false);
			this.m_stateMachine.AddState("move", this._moveState, false);
			this.m_stateMachine.AddState("create", this._createState, false);
			this.m_stateMachine.AddState("pathMove", this._pathMoveState, false);
			this.m_stateMachine.AddState("refresh", this._refreshState, false);
			this.m_stateMachine.ChangeState("refresh");
			this.m_selectActor = null;
			this.m_nav = RxAssetNavNode.GetByName("navnode");
			this.m_layout = RxAssetLayout.GetByName("layout");
			this.m_pathLines = new Array();
			this.m_pathPath = new Array();
			this.m_pathEntityXML = new Array();
			this.m_ignoreP = 0;
			s_pathMouseDown = 0;
			this.m_undo = new Array();
			this.m_redo = new Array();
			this.m_debounce = false;
			this.m_selectOffset = new RxVector4();
			this.m_rotOriginalMousePos = new RxVector4();
		}
		
		private function _selectState(param1:String, param2:Number) : void
		{
			
		}
		
		private function _moveState(param1:String, param2:Number) : void
		{
			
		}
		
		private function _createState(param1:String, param2:Number) : void
		{
			
		}
		
		private function _pathMoveState(param1:String, param2:Number) : void
		{
			
		}
		
		private function _refreshState(param1:String, param2:Number) : void
		{
			
		}
		
	}
}